﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Jack.RedisEventBus.Demo
{
    public class OrderEventHandler : IEventHandle<OrderEvent>
    {
        public Task EventHandle(EventData eventData)
        {
            Console.WriteLine(eventData);
            OrderEvent orderEvent = eventData.ConvertData<OrderEvent>();
            Console.WriteLine($"{orderEvent.OrderNo}");

            return Task.CompletedTask;
        }
    }
}
